source config.sh

ServerID="$1"
if [ "$ServerID" = "" ];then
	echo "$CheckOutOnServer: default server is set "
	ServerID=$(head -1 MahJong/servers.conf | awk {'print $1'})
fi 
echo "$CheckOutOnServer: server ID is $ServerID"

DNS=$(ec2-describe-instances  $ServerID | grep INSTANCE | awk {'print $4'})
User=ubuntu
cat $CheckOutCommands | ssh -oStrictHostKeyChecking=no -i $KeyPairPEM $User@$DNS sh 

$Download $DNS
echo "$CheckOutOnServer: $Dropbox "
cp $DownloadFolder/* $Dropbox/
mv $DownloadFolder/* $OutFiles/

#./afterFindingResult.sh 
#./rebootAllClients.sh
#ec2-reboot-instances $ServerID